import request from '@/utils/request'

// 查询积分等级列表
export function listGradeLevel(query) {
  return request({
    url: '/applet/gradeLevel/list',
    method: 'get',
    params: query
  })
}

// 查询积分等级详细
export function getGradeLevel(id) {
  return request({
    url: '/applet/gradeLevel/' + id,
    method: 'get'
  })
}

// 新增积分等级
export function addGradeLevel(data) {
  return request({
    url: '/applet/gradeLevel',
    method: 'post',
    data: data
  })
}

// 修改积分等级
export function updateGradeLevel(data) {
  return request({
    url: '/applet/gradeLevel',
    method: 'put',
    data: data
  })
}

// 修改积分等级
export function updateGradeLevelStatue(id, status) {
  return request({
    url: `/applet/gradeLevel/changeStatus/${id}/${status}`,
    method: 'get',
  })
}

// 删除积分等级
export function delGradeLevel(id) {
  return request({
    url: '/applet/gradeLevel/' + id,
    method: 'delete'
  })
}
